home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / file / managers / mc-3.2 / mc-3 / mc-3.2.1 / tk / tkmain.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-17  |  1.7 KB  |  64 lines

  1. #ifndef __TKMAIN_H
  2.  
  3. #define __TKMAIN_H
  4.  
  5. #include <tcl.h>
  6. #include <tk.h>
  7. #include "dlg.h"
  8. #include "widget.h"
  9.  
  10. /* Tcl interpreter */
  11. extern Tcl_Interp *interp;
  12.  
  13. int xtoolkit_init (int *argc, char *argv []);
  14. int xtoolkit_end (void);
  15. int tkrundlg_event (Dlg_head *h);
  16. void tk_evalf (char *format,...);
  17.  
  18. /* Required by the standard code */
  19. widget_data xtoolkit_create_dialog (Dlg_head *h);
  20. widget_data xtoolkit_get_main_dialog (Dlg_head *h);
  21. widget_data x_create_panel_container (int which);
  22. void x_panel_container_show (widget_data wdata);
  23.  
  24. void x_destroy_cmd (void *);
  25.  
  26. int x_create_radio (Dlg_head *h, widget_data parent, WRadio *r);
  27. int x_create_check (Dlg_head *h, widget_data parent, WCheck *c);
  28. int x_create_label (Dlg_head *h, widget_data parent, WLabel *l);
  29. int x_create_input (Dlg_head *h, widget_data parent, WInput *in);
  30. int x_create_listbox (Dlg_head *h, widget_data parent, WListbox *l);
  31. int x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb);
  32. void x_list_insert (WListbox *l, WLEntry *p, WLEntry *e);
  33. void x_redefine_label (WButtonBar *bb, int idx);
  34.  
  35. /* Configuration parameters */
  36. extern int use_one_window;
  37.  
  38. typedef int (*tcl_callback)(ClientData, Tcl_Interp *, int, char *[]);
  39. char * tk_new_command (widget_data parent, void *widget,
  40.                tcl_callback callback, char id);
  41.  
  42. #define STREQ(a,b) (*a == *b && (strcmp (a,b) == 0))
  43.  
  44. /* Widget value extraction */
  45.  
  46. /* Return the widget name */
  47. static inline char *wtcl_cmd (Widget w)
  48. {
  49.     return (char *) w.wdata;
  50. }
  51.  
  52. static inline char *wtk_win (Widget w)
  53. {
  54.     return (char *)(w.wdata)+1;
  55. }
  56.  
  57. /* tkkey.c */
  58. int lookup_keysym (char *s);
  59.  
  60. /* tkmain.c */
  61. void tk_focus_widget (Widget_Item *p);
  62.  
  63. #endif /* __TKMAIN_H */
  64.